<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>复合选择器</title>
    <style>
        ul li {
            color: red;
        }

        #nav li {
            color: orange;
        }

        p>span {
            color: pink;
        }

        .nav a {
            color: red;
            text-decoration: none;
        }
    </style>
</head>

<body>
    <div>
        <ul>
            哈哈
            <li>1</li>
            <li>2</li>
            <li>3</li>
        </ul>
        <ol>
            <li>x</li>
            <li>y</li>
            <li>z</li>
        </ol>
        <ul id="nav">
            <li>1</li>
            <li>2</li>
            <li>3</li>
        </ul>
    </div>

    <p><span>
            哈哈
        </span></p>
    <div>
        <p><span>哦哦</span></p>
    </div>

    <div class="nav">
        <ul>
            <li><a href="#">百度</a></li>
            <li><a href="#">百度</a></li>
        </ul>
    </div>
</body>

</html>